USE [MTNOH_SH_APP]
GO

/****** Object:  StoredProcedure [dbo].[mtsp_GetDictionarySet]    Script Date: 08/31/2012 17:24:32 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[mtsp_GetDictionarySet]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[mtsp_GetDictionarySet]
GO

USE [MTNOH_SH_APP]
GO

/****** Object:  StoredProcedure [dbo].[mtsp_GetDictionarySet]    Script Date: 08/31/2012 17:24:32 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO






create procedure [dbo].[mtsp_GetDictionarySet]
(
    @boundObjStr varchar(500)
)
as
begin
	EXEC('
	select ID,Name,ParentName 
	from dbo.T_Dictionary 
	where ParentName in ('+@boundObjStr+')
		and ParentID is not null
	order by OrderID
	')
end






GO


